/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mscs.data;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import mscs.data.pojo.Goods;

/**
 *
 * @author Usbuild
 */
public class IGoodsProxy implements IFileDataStore {
    final String fileName = "GoodsList.txt";
    IFileDataStore fd;
    public IGoodsProxy() {
        fd = new FileDataStore(Goods.class, new File(fileName));
    }
    public void add(List list) {
        fd.add(list);
    }

    public List getObjects() {
        return fd.getObjects();

    }

    public List getObjectsByAttr(String key, String value) {
        return fd.getObjectsByAttr(key, value);
    }

    public void deleteByIndex(int[] index) {
        fd.deleteByIndex(index);
    }

    public List searchObjectsByAttr(String key, String regexp) {
        return fd.searchObjectsByAttr(key, regexp);
    }

    public void update(List list) {
        fd.update(list);
    }
}
